import {
  Column,
  Entity,
  PrimaryGeneratedColumn,
  BaseEntity,
  CreateDateColumn,
  OneToMany,
  JoinColumn,
} from 'typeorm';
import { IconList } from './icon-list.entity';

@Entity()
export class IconGroupList extends BaseEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ type: 'varchar', name: 'name' })
  name: string;

  @OneToMany(() => IconList, (iconList) => iconList.iconGroup)
  @JoinColumn({ name: 'icon_group_id' })
  iconList: IconList[];

  @CreateDateColumn({ type: 'timestamp' })
  createTime: Date;
}

// export class IconList {}
